import store from '@/store';
import {
    getUserOpenIdService
} from '../service';

/**
 * 获取城市列表
 */
export async function getUserOpenId(payload = {}) {
    const allData = await getUserOpenIdService(payload);
    if (allData.code >= 2000 && allData.code < 4000) {
        store.commit('setUserId', allData.data.openId); // 将获取到的数据值存到store中
    }
    return allData;
}
